<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  <meta charset="UTF-8">
  <meta 
    name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <meta 
    http-equiv="X-UA-Compatible" 
    content="ie=edge">
  <meta 
    name="theme-color" 
    content="#fff" 
    id="theme-color">
  <meta 
    name="description" 
    content="程序员的快乐小网站">
  <link 
    rel="icon" 
    href="https://demo.theme-kaze.top/img/Kaze.png">
  <title>计算机网络应用层（上）</title>
  
    
      <meta 
        property="og:title" 
        content="计算机网络应用层（上）">
    
    
      <meta 
        property="og:url" 
        content="http://www.baikaihua.gitee.io/2021/10/01/02%EF%BC%8C%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E5%B1%82%EF%BC%88%E4%B8%8A%EF%BC%89/index.html">
    
    
      <meta 
        property="og:img" 
        content="https://gitee.com/baikaihua/tochang/raw/master/src=http___p.ananas.chaoxing.com_star_1024_0_1386654164315jnqhb.jpg&amp;refer=http___p.ananas.chaoxing.jpg">
    
    
      <meta 
        property="og:img" 
        content="&lt;p&gt;计算机网络应用层上的应用简单介绍，如：web应用、Email应用、DNS应用。&lt;/p&gt;
&lt;p&gt;整理：白开画&lt;/p&gt;">
    
    
      <meta 
        property="og:type" 
        content="article">
      <meta 
        property="og:article:published_time" 
        content="2021-10-01">
      <meta 
        property="og:article:modified_time" 
        content="2021-10-03">
      <meta 
        property="og:article:author" 
        content="白开画 and 徐威">
      
        
          <meta 
            property="og:article:tag" 
            content="计算机网络">
        
          <meta 
            property="og:article:tag" 
            content="网络">
        
          <meta 
            property="og:article:tag" 
            content="白开画">
        
      
    
  
  <script>
    function loadScript(url, cb) {
      var script = document.createElement('script');
      script.src = url;
      if (cb) script.onload = cb;
      script.async = true;
      document.body.appendChild(script);
    }
    function loadCSS(href, data, attr) {
      var sheet = document.createElement('link');
      sheet.ref = 'stylesheet';
      sheet.href = href;
      sheet.dataset[data] = attr;
      document.head.appendChild(sheet);
    }
    function changeCSS(cssFile, data, attr) {
      var oldlink = document.querySelector(data);
      var newlink = document.createElement("link");
      newlink.setAttribute("rel", "stylesheet");
      newlink.setAttribute("href", cssFile);
      newlink.dataset.prism = attr;
      document.head.replaceChild(newlink, oldlink);
    }
  </script>
  
    
  
  <script>
    // control reverse button
    var reverseDarkList = {
      dark: 'light',
      light: 'dark'
    };
    var themeColor = {
      dark: '#1c1c1e',
      light: '#fff'
    }
    // get the data of css prefers-color-scheme
    var getCssMediaQuery = function() {
      return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
    };
    // reverse current darkmode setting function
    var reverseDarkModeSetting = function() {
      var setting = localStorage.getItem('user-color-scheme');
      if(reverseDarkList[setting]) {
        setting = reverseDarkList[setting];
      } else if(setting === null) {
        setting = reverseDarkList[getCssMediaQuery()];
      } else {
        return;
      }
      localStorage.setItem('user-color-scheme', setting);
      return setting;
    };
    // apply current darkmode setting
  </script>
  
    <script>
      var setDarkmode = function(mode) {
      var setting = mode || localStorage.getItem('user-color-scheme');
      if(setting === getCssMediaQuery()) {
        document.documentElement.removeAttribute('data-user-color-scheme');
        localStorage.removeItem('user-color-scheme');
        document.getElementById('theme-color').content = themeColor[setting];
        document.getElementById('theme-color').dataset.mode = setting;
      } else if(reverseDarkList[setting]) {
        document.documentElement.setAttribute('data-user-color-scheme', setting);
        document.getElementById('theme-color').content = themeColor[setting];
        document.getElementById('theme-color').dataset.mode = setting;
      } else {
        document.documentElement.removeAttribute('data-user-color-scheme');
        localStorage.removeItem('user-color-scheme');
        document.getElementById('theme-color').content = themeColor[getCssMediaQuery()];
        document.getElementById('theme-color').dataset.mode = getCssMediaQuery();
      }
    };
    setDarkmode();
    </script>
  
  
  <link rel="preload" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css" as="style" >
  <link rel="preload" href="//at.alicdn.com/t/font_1952792_89b4ac4k4up.css" as="style" >
  
  
    <link rel="preload" href="/js/lib/lightbox/baguetteBox.min.js" as="script">
    <link rel="preload" href="/js/lib/lightbox/baguetteBox.min.css" as="style" >
  
  
    <link rel="preload" href="/js/lib/lozad.min.js" as="script">
  
  
  
  
    
    <link rel="prefetch" href="//cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" as="script">
  
  
    
    <link rel="prefetch" href="//unpkg.com/valine/dist/Valine.min.js" as="script">
  
  
  
  <link rel="stylesheet" href="/css/main.css">
  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css">
  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1952792_89b4ac4k4up.css">
  
    <link rel="stylesheet" href="/js/lib/lightbox/baguetteBox.min.css">
  
<meta name="generator" content="Hexo 5.4.0"></head>

  <body>
    <div class="wrapper">
       
      <nav class="navbar">
  <div class="navbar-logo">
    <span class="navbar-logo-main">
      
        <img 
          class="navbar-logo-img" 
          src="https://demo.theme-kaze.top/img/Kaze.png" 
          alt="blog logo">
      
      <span class="navbar-logo-dsc">程序小站</span>
    </span>
  </div>
  <div class="navbar-menu">
    
      <a 
        href="/" 
        class="navbar-menu-item">
        
          首页
        
      </a>
    
      <a 
        href="/archives" 
        class="navbar-menu-item">
        
          归档
        
      </a>
    
      <a 
        href="/tags" 
        class="navbar-menu-item">
        
          标签
        
      </a>
    
      <a 
        href="/categories" 
        class="navbar-menu-item">
        
          分类
        
      </a>
    
      <a 
        href="/about" 
        class="navbar-menu-item">
        
          关于
        
      </a>
    
    <a 
      class="navbar-menu-item darknavbar" 
      id="dark">
      <i class="iconfont icon-weather"></i>
    </a>
    <a 
      class="navbar-menu-item searchnavbar" 
      id="search">
      <i 
        class="iconfont icon-search" 
        style="font-size: 1.2rem; font-weight: 400;">
      </i>
    </a>
  </div>
</nav> 
      
      <div 
        id="local-search" 
        style="display: none">
        <input
          class="navbar-menu-item"
          id="search-input"
          placeholder="请输入搜索内容..." />
        <div id="search-content"></div>
      </div>
      
      <div class="section-wrap">
        <div class="container">
          <div class="columns">
            <main class="main-column">
  <div class="image-wrapper">
    <img 
      src="https://gitee.com/baikaihua/tochang/raw/master/src=http___p.ananas.chaoxing.com_star_1024_0_1386654164315jnqhb.jpg&amp;refer=http___p.ananas.chaoxing.jpg" 
      data-src="https://gitee.com/baikaihua/tochang/raw/master/src=http___p.ananas.chaoxing.com_star_1024_0_1386654164315jnqhb.jpg&amp;refer=http___p.ananas.chaoxing.jpg"
      srcset="data:image/svg+xml,%3Csvg%20xmlns=&#39;http://www.w3.org/2000/svg&#39;%20viewBox=&#39;0%200%20300%20300&#39;%3E%3C/svg%3E"
      class="image lozad"
      alt="计算机网络应用层（上） thumbnail">
  </div>

<article class="card card-content">
  <header>
    <h1 class="post-title">
      计算机网络应用层（上）
    </h1>
  </header>
  <div class="post-meta post-show-meta">
    <time datetime="2021-10-01T12:04:51.602Z">
      <i 
        class="iconfont icon-calendar" 
        style="margin-right: 2px;">
      </i>
      <span>2021-10-01</span>
    </time>
    
      <span class="dot"></span>
      
        <a 
          href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" 
          class="post-meta-link">
          计算机网络
        </a>
      
    
    
      <span class="dot"></span>
      <span>4.2k 字</span>
    
  </div>
  
    <div 
      class="post-meta post-show-meta" 
      style="margin-top: -10px;">
      <div style="display: flex; align-items: center;">
        <i 
          class="iconfont icon-biaoqian" 
          style="margin-right: 2px; font-size: 1.15rem;">
        </i>
        
          
          <a 
            href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" 
            class="post-meta-link">
            计算机网络
          </a>
        
          
            <span class="dot"></span>
          
          <a 
            href="/tags/%E7%BD%91%E7%BB%9C/" 
            class="post-meta-link">
            网络
          </a>
        
          
            <span class="dot"></span>
          
          <a 
            href="/tags/%E7%99%BD%E5%BC%80%E7%94%BB/" 
            class="post-meta-link">
            白开画
          </a>
        
      </div>
    </div>
  
  </header>
  <div 
    id="section" 
    class="post-content">
    <p>计算机网络应用层上的应用简单介绍，如：web应用、Email应用、DNS应用。</p>
<p>整理：白开画</p>
<span id="more"></span>
<h2 id="网络应用层内容概括"><a class="markdownIt-Anchor" href="#网络应用层内容概括"></a> 网络应用层内容概括</h2>
<p>（1）网络应用体系结构</p>
<ul>
<li>客户机/服务器</li>
<li>P2P</li>
<li>混合结构</li>
</ul>
<p>（2）网络应用的服务需求</p>
<ul>
<li>可靠性</li>
<li>带宽</li>
<li>时延</li>
</ul>
<p>（3）lnternet传输层服务模型</p>
<ul>
<li>TCP</li>
<li>UDP</li>
</ul>
<p>（4）特定网络应用及协议</p>
<ul>
<li>HTTP</li>
<li>SMTP、POP、IMAP</li>
<li>DNS</li>
<li>P2P应用</li>
</ul>
<p>（5）Socket编程</p>
<ul>
<li>TCP</li>
<li>UDP</li>
</ul>
<h2 id="网络应用的基本原理"><a class="markdownIt-Anchor" href="#网络应用的基本原理"></a> 网络应用的基本原理</h2>
<h3 id="网络应用的体系结构"><a class="markdownIt-Anchor" href="#网络应用的体系结构"></a> 网络应用的体系结构</h3>
<p>（1）典型的网络应用</p>
<p>​			百度、QQ、email、迅雷、支付宝、微信、百度云、淘宝、网易</p>
<p>（2）三大体系结构：</p>
<ul>
<li>客户机/服务器结构（C/S）</li>
<li>点对点结构（P2P）</li>
<li>混合结构（Hybrid）</li>
</ul>
<p>（3）客户机/服务器结构（C/S）</p>
<ul>
<li>
<p>服务器</p>
<p>1.7*24小时提供服务</p>
<p>2.永久性访问地址/域名</p>
<p>3.利用大量服务器实现可扩展性</p>
</li>
<li>
<p>客户机</p>
<p>1.与服务器通信，使用服务器提供的服务</p>
<p>2.间歇性接入网络</p>
<p>3.可能使用动态ip地址</p>
<p>4.不会与其他客户机直接通信</p>
</li>
</ul>
<p>（4）P2P结构</p>
<ul>
<li>没有永远在线的服务器</li>
<li>任意端系统/节点之间可以直接通讯</li>
<li>节点间歇性接入网络</li>
<li>节点可能改变IP地址</li>
</ul>
<p>​      优点：高度可伸缩</p>
<p>​      缺点：难于管理</p>
<p>（5）混合结构</p>
<p>​       Napster应用</p>
<ul>
<li>
<p>文件传输使用P2P结构</p>
</li>
<li>
<p>文件的搜索采用C/S结构——集中式</p>
<p>1.每个节点向中央服务器登记自己的内容</p>
<p>2.每个节点向中央服务器提交查询请求</p>
</li>
</ul>
<h3 id="网络应用进程通信"><a class="markdownIt-Anchor" href="#网络应用进程通信"></a> 网络应用进程通信</h3>
<p>（1）进程</p>
<ul>
<li>一段程序的执行过程</li>
</ul>
<p>（2）同主机运行的进程间通信</p>
<ul>
<li>进程间通信机制</li>
<li>操作系统提供</li>
</ul>
<p>​           不同主机运行的进程间通信</p>
<ul>
<li>消息交换</li>
</ul>
<p>（4）客户机进程：发起通信的进程</p>
<p>​		   服务器进程：等待通信请求的进程</p>
<p>（5）套接字（Socket）</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813173237.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813173237.png" class="lozad post-image"></p>
<ul>
<li>
<p>进程间通信利用套接字发送/接收消息实现</p>
</li>
<li>
<p>类似于寄信</p>
<p>1.发送方将消息送到门外邮箱</p>
<p>2.发送方依赖（门外的）传输基础设施将消息传到接收方所在主机，并送到接收方的门外</p>
<p>3.接收方从门外获取消息</p>
</li>
<li>
<p>传输基础设施向进程提供API</p>
<p>1.传输协议的选择</p>
<p>2.参数的设置</p>
</li>
</ul>
<p>（6）寻址进程</p>
<p>​		不同主机上的进程间通信，每个进程必须拥有<strong>标识符</strong>，同一主机上可能同时多个进程需要通信</p>
<ul>
<li>
<p>端口号</p>
<p>1.为主机上每个需要通信的进程分配一个端口号</p>
<p>2.HTTP Server：80</p>
<p>3.mail Server：25</p>
</li>
<li>
<p>进程的标识符=IP地址＋端口号</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813174420.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813174420.png" class="lozad post-image"></p>
</li>
</ul>
<p>（7）应用层协议</p>
<ul>
<li>
<p>网络应用需要遵循应用层协议</p>
</li>
<li>
<p>公开协议</p>
<p>1.由RFC定义</p>
<p>2.允许互操作</p>
<p>3.HTTP，SMTP等</p>
</li>
<li>
<p>私有协议</p>
<p>1.多数P2P文件共享应用</p>
</li>
</ul>
<p>（8）应用层协议的内容</p>
<ul>
<li>
<p>消息的类型</p>
<p>1.请求消息</p>
<p>2.响应消息</p>
</li>
<li>
<p>消息的语法/格式</p>
<p>1.消息中的字段</p>
<p>2.每个字段如何描述</p>
</li>
<li>
<p>字段的语义</p>
<p>1.字段中信息的含义</p>
</li>
<li>
<p>规则</p>
<p>1.进程何时发送/响应消息</p>
<p>2.进程如何发送/响应消息</p>
</li>
</ul>
<h3 id="网络应用需求与传输层服务"><a class="markdownIt-Anchor" href="#网络应用需求与传输层服务"></a> 网络应用需求与传输层服务</h3>
<p>（1）网络应用对传输服务的需求</p>
<ul>
<li>
<p>数据丢失/可靠性</p>
<p>1.某些网络能够容忍一定的数据丢失：网络电话</p>
<p>2.某些网络应用需求要求可靠的数据传输：文件传输、telnet</p>
</li>
<li>
<p>时间/延迟</p>
<p>1.有些应用只有在延迟足够低才“有效&quot;</p>
<p>2.网络电话/网络游戏</p>
</li>
<li>
<p>带宽</p>
<p>1.某些应用只有在带宽到达最低要求才“有效”：网络视频</p>
<p>2.某些应用能够适应任何带宽——弹性应用：文件传输、email</p>
</li>
</ul>
<p>（2）lnternet提供的传输服务</p>
<ul>
<li>
<p>TCP服务</p>
<p>1.面向连接：客户机/服务器进程间需要建立连接</p>
<p>2.可靠的传输</p>
<p>3.流量控制：发送方不会发送速度过快，超过接收方的处理能力</p>
<p>4.拥塞控制：当网络负载过重时能够限制发送方的发送速度</p>
<p>5.不提供时间/延迟保障</p>
<p>6.不提供最小带宽保障</p>
</li>
<li>
<p>UDP服务</p>
<p>1.无连接</p>
<p>2.不可靠的数据传输</p>
<p>3.不提供：可靠性保障、流量控制、拥塞控制、延迟控制、带宽保障</p>
</li>
</ul>
<h2 id="web应用"><a class="markdownIt-Anchor" href="#web应用"></a> Web应用</h2>
<h3 id="web概述"><a class="markdownIt-Anchor" href="#web概述"></a> Web概述</h3>
<p>​	1.Web的构成</p>
<ul>
<li>网页</li>
<li>网页互相连接</li>
</ul>
<p>​     2.网页包含多个对象</p>
<ul>
<li>对象：HTML文件、JPEG图片、视频文件、动态脚本等</li>
<li>基本HTML文件：包含对其他对象引用连接</li>
</ul>
<p>​     3.对象的寻址</p>
<ul>
<li>URL：统一资源定位器	RFC1738</li>
<li>Schwme：//host：port/path</li>
</ul>
<h3 id="http协议概述"><a class="markdownIt-Anchor" href="#http协议概述"></a> HTTP协议概述</h3>
<p>​	1.超文本传输协议</p>
<ul>
<li>HTTP</li>
</ul>
<p>​    2 .C/S结构</p>
<ul>
<li>客户：请求、接收、展示Web对象</li>
<li>服务器：响应客户的请求，发送对象</li>
</ul>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813160016.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813160016.png" class="lozad post-image"></p>
<p>3.使用TCP传输服务</p>
<ul>
<li>服务器在80端口等待客户的请求</li>
<li>浏览器发起到服务器的TCP连接（创建套接字Scoket）</li>
<li>服务器接收来自浏览器的TCP连接</li>
<li>浏览器（HTTP客户端）与Web服务器（HTTP服务器）交换HTTP消息</li>
<li>关闭TCP连接</li>
</ul>
<p>4.无状态</p>
<ul>
<li>服务器不维护任何有关客户端过去所发送请求的信息</li>
</ul>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813160703.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813160703.png" class="lozad post-image"></p>
<h3 id="http连接类型"><a class="markdownIt-Anchor" href="#http连接类型"></a> HTTP连接类型</h3>
<p>1.非持久性连接</p>
<ul>
<li>每一个TCP连接最多允许传输一个对象</li>
<li>HTTP 1.0版本使用非持久性连接</li>
</ul>
<p>（1）响应时间分析建模：</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813162322.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813162322.png" class="lozad post-image"></p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813162401.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813162401.png" class="lozad post-image"></p>
<p>​	RTT：从客户端发送一个很小的数据包到服务器并返回经历的时间</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813162625.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210813162625.png" class="lozad post-image"></p>
<p>​	Total=2RTT+文件发送时间</p>
<p>（2）非持久性连接的问题：</p>
<ul>
<li>每个对象需要2个RTT</li>
<li>操作系统需要为每个TCP连接开销资源</li>
</ul>
<p>2.持久性连接</p>
<ul>
<li>每一个TCP连接允许传输多个对象</li>
<li>HTTP 1.1默认使用持久性连接</li>
</ul>
<p>（1）持久性连接</p>
<ul>
<li>发送响应后，服务器保持TCP连接的打开</li>
<li>后续的HTTP消息可以通过这个连接发送</li>
</ul>
<p>（2）无流水的持久性连接</p>
<ul>
<li>客户端只有收到前一个响应后才发送新的请求</li>
<li>每一个被引用的对象耗时1个RTT</li>
</ul>
<p>（3）带有流水机制的持久性连接</p>
<ul>
<li>HTTP 1.1的默认选项</li>
<li>客户端只要遇到一个引用对象就尽快发送请求
<ul>
<li>理想情况下，收到所有的引用对象只需耗时约1个RTT</li>
</ul>
</li>
</ul>
<h3 id="http消息格式"><a class="markdownIt-Anchor" href="#http消息格式"></a> HTTP消息格式</h3>
<p>​	（1）方法类型</p>
<ul>
<li>
<p>HTTP/1.0</p>
<p>1.GET</p>
<p>2.POST</p>
<p>3.HEAD</p>
</li>
<li>
<p>HTTP/1.1</p>
<p>1.GET,POST,HEAD</p>
<p>2.PUT（将消息中的文件上传到URL字段所指定的路径）</p>
<p>3.DELETE（删除URL字段所指的文件）</p>
</li>
</ul>
<p>（2）HTTP协议有两类消息</p>
<p>​		1.请求消息</p>
<p>​		2.响应消息</p>
<p>（3）HTTP请求消息</p>
<ul>
<li>ASCII：人直接可读</li>
</ul>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210818162209.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210818162209.png" class="lozad post-image"></p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210818160623.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210818160623.png" class="lozad post-image"></p>
<p>上传输入的方法：</p>
<ul>
<li>
<p>POST方法</p>
<p>1.网页经常需要填写表格</p>
<p>2.在请求消息的消息体中上传客户端的输入</p>
</li>
<li>
<p>URL方法</p>
<p>1.使用GET方法</p>
<p>2.输入信息通过request行的URL字段上传</p>
</li>
</ul>
<p>（4）响应消息</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210818162243.png" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20210818162243.png" class="lozad post-image"></p>
<p>（5）HTTP响应状态代码</p>
<p>​	1.响应消息的第一行</p>
<ul>
<li>200 K</li>
<li>301 Moved Permanently</li>
<li>400 Bad Request</li>
<li>404 Not Found</li>
<li>505 HTTP Version Not Supported</li>
</ul>
<h3 id="cookie技术"><a class="markdownIt-Anchor" href="#cookie技术"></a> Cookie技术</h3>
<p>​	某网站为了辨别用户身份、进行session跟踪而储存在用户本地终端上的数据（通常经过加密）。</p>
<p>（1）Cookie组件</p>
<ul>
<li>HTTP响应消息的cookie头部行</li>
<li>HTTP请求消息的cookie头部行</li>
<li>保存在客户端主机上的cookie文件，由浏览器管理</li>
<li>web服务器的后台数据库</li>
</ul>
<p>（2）Cookie访问过程</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001155357.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001155357.jpg" class="lozad post-image"></p>
<p>（3）Cookie的作用</p>
<ul>
<li>身份认证</li>
<li>购物车</li>
<li>推荐</li>
<li>web e-mail</li>
<li>…</li>
</ul>
<p>（4）缺点</p>
<ul>
<li>暴露隐私</li>
</ul>
<h3 id="web缓存代理服务器技术"><a class="markdownIt-Anchor" href="#web缓存代理服务器技术"></a> Web缓存/代理服务器技术</h3>
<p>（1）功能：在不访问服务器的前提下满足客户端的HTTP请求。</p>
<p>（2）作用：</p>
<ul>
<li>缩短客户请求的响应时间</li>
<li>减少机构/组织的流量</li>
<li>在打范围内实现有效的内容转发</li>
</ul>
<p>（3）代理服务器</p>
<ul>
<li>
<p>用户设定浏览器通过缓存进行web访问</p>
</li>
<li>
<p>浏览器向缓存/代理服务器发送所以的HTTP请求</p>
<p>1.如果请求对象在缓存中，缓存返回对象</p>
<p>2.否则，缓存服务器向原始服务器发送HTTP请求，获取对象，返回给客户端并保存该对象</p>
</li>
<li>
<p>缓存即当客户端，也充当服务器</p>
</li>
<li>
<p>一般由ISP架设</p>
</li>
</ul>
<p>（4）条件性GET方法</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001161447.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001161447.jpg" class="lozad post-image"></p>
<ul>
<li>
<p>目标</p>
<p>如果缓存有最新的版本，则不需要发送请求对象</p>
</li>
<li>
<p>缓存</p>
<p>1.在HTTP请求消息中声明所持有版本的日期</p>
<p>2.if-modifiesd-since:<data></p>
</li>
<li>
<p>服务器</p>
<p>1.如果缓存的版本是最新的，则响应消息中不包含对象</p>
<p>2.HTTP/1.0 304 Not Modified</p>
</li>
</ul>
<h2 id="email应用"><a class="markdownIt-Anchor" href="#email应用"></a> Email应用</h2>
<h3 id="email应用概述"><a class="markdownIt-Anchor" href="#email应用概述"></a> Email应用概述</h3>
<p>（1）Email应用的构成</p>
<p>​	  	1.Email应用的构成组件</p>
<ul>
<li>
<p>邮件客户端</p>
</li>
<li>
<p>邮件服务器</p>
</li>
<li>
<p>SMTP协议</p>
</li>
</ul>
<p>​          2.邮件客户端</p>
<ul>
<li>
<p>读、写Email消息</p>
</li>
<li>
<p>与服务器交互，收，发Email消息</p>
</li>
<li>
<p>Outlook，Foxmail，Thunderbird</p>
</li>
<li>
<p>web客户端</p>
</li>
</ul>
<ol start="3">
<li>邮件服务器</li>
</ol>
<ul>
<li>邮箱：存储发给该用户的Email</li>
<li>消息队列：存储等待发送的Email</li>
</ul>
<p>​           4.SMTP协议</p>
<ul>
<li>邮件服务器之间传递消息所使用的协议</li>
<li>客户端：发送消息的服务器</li>
<li>服务器：接受消息的服务器</li>
<li>使用持久性连接</li>
<li>要求消息必须由7位ASCII码构成</li>
<li>SMTP服务器利用CRLF.CRLF确定消息的结束。</li>
</ul>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001164615.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001164615.jpg" class="lozad post-image"></p>
<p>（2）SMTP协议：RFC 2821</p>
<p>​		1.使用TCP进行email消息的可靠传输</p>
<p>​		2.端口25</p>
<p>​		3.传输过程的三个阶段</p>
<ul>
<li>握手</li>
<li>消息的传输</li>
<li>关闭</li>
</ul>
<p>​         4.命令/响应交互模式</p>
<ul>
<li>命令：ASCII文本</li>
<li>响应：状态代码和语句</li>
</ul>
<p>​         5.Email消息只能包含7位ASCII码</p>
<p>（3）Email应用实例</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001165557.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001165557.jpg" class="lozad post-image"></p>
<p>（4）SMTP交互实例</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001170009.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001170009.jpg" class="lozad post-image"></p>
<p>（5）SMTP与HTTP对比</p>
<ul>
<li>HTTP：拉式</li>
<li>SMTP：推试</li>
<li>都使用命令/响应交互模式</li>
<li>HTTP：每一个对象封装在独立的响应消息中</li>
<li>SMTP:多个对象在由多个部分构成的消息中发送</li>
</ul>
<h3 id="email消息格式与pop3协议"><a class="markdownIt-Anchor" href="#email消息格式与pop3协议"></a> Email消息格式与POP3协议</h3>
<p>（1）Email消息格式</p>
<p>​		1.SMTP：email消息的传输/交换协议</p>
<p>​		2.RFC 822：文本消息格式标准</p>
<ul>
<li>
<p>头部行</p>
<p><a target="_blank" rel="noopener" href="http://1.To">1.To</a></p>
<p>2.From</p>
<p>3.Subject</p>
</li>
<li>
<p>消息体</p>
<p>1.消息体本身</p>
<p>2.只能是ASCII字符</p>
<img  srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001172345.jpg" class="lozad post-image"src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001172345.jpg">
</li>
</ul>
<p>（2）多媒体邮件扩展</p>
<p>​		1.MIME：多媒体邮件扩展RFC 2045,2056</p>
<ul>
<li>通过在邮件头部增加额外的行以声明MIME的内容类型</li>
</ul>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001172639.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001172639.jpg" class="lozad post-image"></p>
<p>（3）邮件访问协议</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001172942.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001172942.jpg" class="lozad post-image"></p>
<p>​		1.邮件访问协议：从服务器获取邮件</p>
<ul>
<li>
<p>POP：认证/授权（客户端&lt;—&gt;服务器）下载</p>
</li>
<li>
<p>IMAP：</p>
<p>1.更多的功能</p>
<p>2.更加复杂</p>
<p>3.能够操纵服务器上的储存的消息</p>
</li>
<li>
<p>HTTP：163，QQmail等。</p>
</li>
</ul>
<p>（4）POP协议</p>
<p>​		1.认证过程</p>
<ul>
<li>
<p>客户端命令</p>
<p>1.User：声明用户名</p>
<p>2.Pass：声明密码</p>
</li>
<li>
<p>服务器响应</p>
<p>1.+OK</p>
<p>2.-ERR</p>
</li>
</ul>
<p>​        2.事务阶段</p>
<ul>
<li>List：列出消息数量</li>
<li>Retr：用编号获取消息</li>
<li>Dele：删除消息</li>
<li>Quit</li>
</ul>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001173748.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001173748.jpg" class="lozad post-image"></p>
<p>​		3.“下载并删除”模式</p>
<ul>
<li>用户如果换客户端软件，无法重新读该邮件</li>
</ul>
<p>​        4.“下载并保存”模式：不同客户端都可以保存消息的拷贝</p>
<p>​         5.POP3是无状态的</p>
<p>（5）IMAP协议</p>
<p>​		1.所以消息统一保存在一个地方：服务器</p>
<p>​		2.允许用户利用文件夹组织消息</p>
<p>​		3.IMAP支持跨会话的用户状态：</p>
<ul>
<li>文件夹的名字</li>
<li>文件夹与消息ID之间的映射等</li>
</ul>
<h2 id="dns应用"><a class="markdownIt-Anchor" href="#dns应用"></a> DNS应用</h2>
<h3 id="dns概述"><a class="markdownIt-Anchor" href="#dns概述"></a> DNS概述</h3>
<p>（1）DNS简述</p>
<p>​		1.lnternet上主机/路由器的识别问题</p>
<ul>
<li>IP地址</li>
<li>域名</li>
</ul>
<p>​         2.域名解析系统DNS</p>
<ul>
<li>
<p>多层命名服务器构成的分布式数据库</p>
</li>
<li>
<p>应用层协议：完成名字的解析</p>
<p>1.lnternet核心功能，用应用层协议实现</p>
<p>2.网络边界复杂</p>
</li>
</ul>
<p>​         3.DNS服务</p>
<ul>
<li>域名向IP地址的翻译</li>
<li>主机别名</li>
<li>邮件服务器别名</li>
<li>负载均衡：Web服务器</li>
</ul>
<p>​         4.为什么不使用集中式的DNS？</p>
<ul>
<li>单点失败问题</li>
<li>流量问题</li>
<li>距离问题</li>
<li>维护问题</li>
</ul>
<p>（2）分布式层次式数据库</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001191229.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001191229.jpg" class="lozad post-image"></p>
<p>​		1.DNS根域名服务器</p>
<ul>
<li>本地域名服务器无法解析域名时，访问根域名服务器</li>
</ul>
<p>​		2.根域名服务器</p>
<ul>
<li>如果不知道映射，访问权威域名服务器</li>
<li>获得映射</li>
<li>向本地域名服务器返回映射</li>
</ul>
<p>​         3.TLD和权威域名解析服务器</p>
<ul>
<li>
<p>顶级域名服务器：负责com，org，net，edu等，顶级域名和国家顶级域名，例如cn，uk，fr等</p>
<p>1.Network Solutions维护顶级域名服务器</p>
<p>2.Educause维护edu顶级域名服务器</p>
</li>
<li>
<p>权威域名服务器：组织的域名解析服务器，提供组织内部服务器的解析服务</p>
<p>1.组织负责维护</p>
<p>2.服务提供商负责维护</p>
</li>
</ul>
<p>​          4.本地域名解析服务器</p>
<ul>
<li>
<p>不严格属于层级体系</p>
</li>
<li>
<p>每个ISP有一个本地域名服务器</p>
<p>1.默认域名解析服务器</p>
</li>
<li>
<p>当主机进行DNS查询时，查询被发送到本地域名服务器</p>
<p>1.作为代理，将查询转发给（层级式）域名解析服务器系统</p>
</li>
</ul>
<p>（3）DNS查询实例</p>
<p>​	<a target="_blank" rel="noopener" href="http://xn--Awww-zh5f36uolhnzgu77a2maw8ac980ahdg2q2b.cqvie.edu.cn">如果主机A要访问服务器www.cqvie.edu.cn</a>：</p>
<p>​	1.主机A会首先检查本机hosts文件，如果该文件中有域名与IP的对应关系，直接得到解析结果。</p>
<p>​	2.如果hosts文件中没有相关记录，则根据本机配置的DNS服务器IP地址，到本地域名服务器进行查询。</p>
<p>​	3.如果DNS服务器为域名www.baidu.com的授权域名服务器，即负责改区域下主机的域名解析，可以直接向主机A返回权威应答。</p>
<p>​	4.如果不是该区域的授权域名服务器，则查看缓存中是否有解析记录，如果有返回非权威应答。</p>
<p>​	5.如果缓存中也没有解析记录，即本DNS服务器无法解析，则查看是否设有转发域名服务器，如果有则将解析请求转发给转发服务器。</p>
<p>​	6.如果没有设置转发域名服务器，解析请求将被发送到根域名服务器。</p>
<p>​	7.由于根域名服务器已将cn区域的解析，<a target="_blank" rel="noopener" href="http://xn--dns-0h9dx1nx2a16e43gmyda126cp14az5ns74cbe0a.cn">委托给出了域的域名服务器dns.cn</a>，因此根域名服务器只返回dns.cn对应的IP地址。</p>
<p>​	8.本地域名服务器根据返回的IP地址向dns.cn发出解析请求。</p>
<p>​	9.域名服务器dns.cn已将edu.cn区域的解析，<a target="_blank" rel="noopener" href="http://xn--dns-4w2e18doxf64cryfu6ymykt39d.edu.cn">委托给域名服务器dns.edu.cn</a>，因此返回dns.edu.cn对应的IP地址。</p>
<p>​	10.本地域名服务器根据返回的IP地址向dns.edu.cn发出解析请求。</p>
<p>​	11.域名服务器dns.edu.cn已将cqvie.edu.cn区域的解析，委托给域名服务器dns.cqvie.edu.c，因此返回dns.cqvie.edu.cn对应的IP地址。</p>
<p>​	12.本地域名服务器根据返回的IP地址向dns.cqvie.edu.cn发出解析请求。</p>
<p>​	13.域名服务器dns.cqvie.edu.cn是cqvie.edu.cn的授权域名服务器，将查询到的www.cqvie.edu.cn和IP地址的对应关系，并向本地域名服务提供权威应答。</p>
<p>​	14.本地域名服务器将解析结果返回给主机A，并将解析记录写入自己的缓存中。</p>
<p>​	15.主机根据解析结果，向目的IP发送数据包。</p>
<p>（4）DNS记录缓存和更新</p>
<p>​		1.只要域名解析服务器获得域名——IP映射，即缓存这一映射</p>
<ul>
<li>
<p>一段时间过后，缓存条目失效（删除）</p>
</li>
<li>
<p>本地域名服务器一般会缓存顶级域名服务器映射</p>
<p>1.因此根域名服务器不经常被访问</p>
</li>
</ul>
<h3 id="dns记录和消息格式"><a class="markdownIt-Anchor" href="#dns记录和消息格式"></a> DNS记录和消息格式</h3>
<p>（1）DNS记录</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001193400.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001193400.jpg" class="lozad post-image"></p>
<p>​		1.资源记录（RR,resource,records）</p>
<p>​		2.Type=A</p>
<ul>
<li>name：主机域名</li>
<li>value：IP地址</li>
</ul>
<p>​         3.Type=NS</p>
<ul>
<li>name：域（<a target="_blank" rel="noopener" href="http://edu.cn">edu.cn</a>）</li>
<li>Value：该域权威域名解析服务器的主机域名</li>
</ul>
<p>​         4.Tyoe=CNAME</p>
<ul>
<li>Name：某一真实域名的别名</li>
<li>Value：真实域名</li>
</ul>
<p>​        5.Type=MX</p>
<ul>
<li>Value是与name相对应得邮件服务器</li>
</ul>
<p>（2）DNS协议与消息</p>
<p><img src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001194559.jpg" alt="" / srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://gitee.com/baikaihua/tochang/raw/master/QQ%E6%88%AA%E5%9B%BE20211001194559.jpg" class="lozad post-image"></p>
<p>​		1.DNS协议：</p>
<ul>
<li>查询和回复</li>
<li>消息格式相同</li>
</ul>
<p>​        2.消息头部</p>
<ul>
<li>
<p>ldentification：16位查询编码，回复使用相同的编号</p>
</li>
<li>
<p>flage</p>
<p>1.查询回复</p>
<p>2.期望递归</p>
<p>3.递归可用</p>
<p>4.权威回答</p>
</li>
</ul>
<p>​</p>

  </div>
  <div>
    
      <div 
        class="post-note note-warning copyright" 
        style="margin-top: 42px">
        <p>
          <span style="font-weight: bold;">作者：</span><a 
            target="_blank" 
            rel="nofollow noopener noreferrer" 
            href="/about">
            白开画 and 徐威
          </a>
        </p>
        <p>
          <span style="font-weight: bold;">文章链接：</span><a 
            target="_blank" 
            rel="nofollow noopener noreferrer" 
            href="http://www.baikaihua.gitee.io/2021/10/01/02%EF%BC%8C%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E5%B1%82%EF%BC%88%E4%B8%8A%EF%BC%89/index.html">
            http://www.baikaihua.gitee.io/2021/10/01/02%EF%BC%8C%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E5%B1%82%EF%BC%88%E4%B8%8A%EF%BC%89/index.html
          </a>
        </p>
        <p><span style="font-weight: bold;">版权声明：</span>本博客所有文章除特别声明外，均采用<a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0 协议</a>。转载请注明出处！</p>
      </div>
    
  </div>
</article>
<div class="nav">
  
    <div class="nav-item-prev">
      <a 
        href="/2021/10/03/PHP%E5%8F%98%E9%87%8F/index.html" 
        class="nav-link">
        <i class="iconfont icon-left nav-prev-icon"></i>
        <div>
          <div class="nav-label">上一篇</div>
          
            <div class="nav-title">PHP变量 </div>
          
        </div>
      </a>
    </div>
  
  
    <div class="nav-item-next">
      <a 
        href="/2021/09/26/PHP%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2/index.html" 
        class="nav-link">
        <div>
          <div class="nav-label">下一篇</div>
          
            <div class="nav-title">PHP数据类型转换 </div>
          
        </div>
        <i class="iconfont icon-right nav-next-icon"></i>
      </a>
    </div>
  
</div>

  <div 
    class="card card-content comment-card" 
    style="margin-top: 16px;">
    <div class="comment-card-title">评论</div>
    
  <div id="vcomments"></div>
  
  <script>
    loadScript("//unpkg.com/valine/dist/Valine.min.js");
    var oldLoadVa = window.onload;
    window.onload = function () {
      oldLoadVa && oldLoadVa();
      new Valine({
        el: '#vcomments',
        appId: 'C2ey5RzCeMGvikIpezIqS1fW-gzGzoHsz',
        appKey: 'yNj1HPpcuT4nFzgDG1hfxiwX',
        placeholder: 'Just go go',
        path: window.location.pathname,
        avatar: 'mp',
        meta: ["nick","mail","link"],
        pageSize: '10',
        lang: '',
        visitor: 'false',
        highlight: true,
        recordIP: false,
        
        
        
        enableQQ: 'false',
        requiredFields: [],
      });
    };
  </script>

  </div>

<div 
  class="card card-content toc-card" 
  id="mobiletoc">
  <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E5%B1%82%E5%86%85%E5%AE%B9%E6%A6%82%E6%8B%AC"><span class="toc-number">1.</span> <span class="toc-text"> 网络应用层内容概括</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86"><span class="toc-number">2.</span> <span class="toc-text"> 网络应用的基本原理</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E7%9A%84%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84"><span class="toc-number">2.1.</span> <span class="toc-text"> 网络应用的体系结构</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E8%BF%9B%E7%A8%8B%E9%80%9A%E4%BF%A1"><span class="toc-number">2.2.</span> <span class="toc-text"> 网络应用进程通信</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E9%9C%80%E6%B1%82%E4%B8%8E%E4%BC%A0%E8%BE%93%E5%B1%82%E6%9C%8D%E5%8A%A1"><span class="toc-number">2.3.</span> <span class="toc-text"> 网络应用需求与传输层服务</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#web%E5%BA%94%E7%94%A8"><span class="toc-number">3.</span> <span class="toc-text"> Web应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#web%E6%A6%82%E8%BF%B0"><span class="toc-number">3.1.</span> <span class="toc-text"> Web概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E5%8D%8F%E8%AE%AE%E6%A6%82%E8%BF%B0"><span class="toc-number">3.2.</span> <span class="toc-text"> HTTP协议概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E8%BF%9E%E6%8E%A5%E7%B1%BB%E5%9E%8B"><span class="toc-number">3.3.</span> <span class="toc-text"> HTTP连接类型</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F"><span class="toc-number">3.4.</span> <span class="toc-text"> HTTP消息格式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#cookie%E6%8A%80%E6%9C%AF"><span class="toc-number">3.5.</span> <span class="toc-text"> Cookie技术</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#web%E7%BC%93%E5%AD%98%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8A%80%E6%9C%AF"><span class="toc-number">3.6.</span> <span class="toc-text"> Web缓存&#x2F;代理服务器技术</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#email%E5%BA%94%E7%94%A8"><span class="toc-number">4.</span> <span class="toc-text"> Email应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#email%E5%BA%94%E7%94%A8%E6%A6%82%E8%BF%B0"><span class="toc-number">4.1.</span> <span class="toc-text"> Email应用概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#email%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F%E4%B8%8Epop3%E5%8D%8F%E8%AE%AE"><span class="toc-number">4.2.</span> <span class="toc-text"> Email消息格式与POP3协议</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#dns%E5%BA%94%E7%94%A8"><span class="toc-number">5.</span> <span class="toc-text"> DNS应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#dns%E6%A6%82%E8%BF%B0"><span class="toc-number">5.1.</span> <span class="toc-text"> DNS概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#dns%E8%AE%B0%E5%BD%95%E5%92%8C%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F"><span class="toc-number">5.2.</span> <span class="toc-text"> DNS记录和消息格式</span></a></li></ol></li></ol>
</div></main>
            <aside class="left-column">
              
              <div class="card card-author">
                
  <img 
    src="https://gitee.com/baikaihua/tochang/raw/master/src=http___b-ssl.duitang.com_uploads_item_201607_07_20160707163006_EnLeG.jpeg&refer=http___b-ssl.duitang.jpg" 
    class="author-img" 
    alt="author avatar">

<p class="author-name">白开画 and 徐威</p>
<p class="author-description">欢迎！</p>
<div class="author-message">
  <a 
    class="author-posts-count" 
    href="/archives">
    <span>33</span>
    <span>文章</span>
  </a>
  <a 
    class="author-categories-count" 
    href="/categories">
    <span>11</span>
    <span>分类</span>
  </a>
  <a 
    class="author-tags-count" 
    href="/tags">
    <span>37</span>
    <span>标签</span>
  </a>
</div>

              </div>
               <div class="sticky-tablet">
  
  
    <article class="display-when-two-columns spacer">
      <div class="card card-content toc-card">
        <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E5%B1%82%E5%86%85%E5%AE%B9%E6%A6%82%E6%8B%AC"><span class="toc-number">1.</span> <span class="toc-text"> 网络应用层内容概括</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86"><span class="toc-number">2.</span> <span class="toc-text"> 网络应用的基本原理</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E7%9A%84%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84"><span class="toc-number">2.1.</span> <span class="toc-text"> 网络应用的体系结构</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E8%BF%9B%E7%A8%8B%E9%80%9A%E4%BF%A1"><span class="toc-number">2.2.</span> <span class="toc-text"> 网络应用进程通信</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E9%9C%80%E6%B1%82%E4%B8%8E%E4%BC%A0%E8%BE%93%E5%B1%82%E6%9C%8D%E5%8A%A1"><span class="toc-number">2.3.</span> <span class="toc-text"> 网络应用需求与传输层服务</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#web%E5%BA%94%E7%94%A8"><span class="toc-number">3.</span> <span class="toc-text"> Web应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#web%E6%A6%82%E8%BF%B0"><span class="toc-number">3.1.</span> <span class="toc-text"> Web概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E5%8D%8F%E8%AE%AE%E6%A6%82%E8%BF%B0"><span class="toc-number">3.2.</span> <span class="toc-text"> HTTP协议概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E8%BF%9E%E6%8E%A5%E7%B1%BB%E5%9E%8B"><span class="toc-number">3.3.</span> <span class="toc-text"> HTTP连接类型</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F"><span class="toc-number">3.4.</span> <span class="toc-text"> HTTP消息格式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#cookie%E6%8A%80%E6%9C%AF"><span class="toc-number">3.5.</span> <span class="toc-text"> Cookie技术</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#web%E7%BC%93%E5%AD%98%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8A%80%E6%9C%AF"><span class="toc-number">3.6.</span> <span class="toc-text"> Web缓存&#x2F;代理服务器技术</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#email%E5%BA%94%E7%94%A8"><span class="toc-number">4.</span> <span class="toc-text"> Email应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#email%E5%BA%94%E7%94%A8%E6%A6%82%E8%BF%B0"><span class="toc-number">4.1.</span> <span class="toc-text"> Email应用概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#email%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F%E4%B8%8Epop3%E5%8D%8F%E8%AE%AE"><span class="toc-number">4.2.</span> <span class="toc-text"> Email消息格式与POP3协议</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#dns%E5%BA%94%E7%94%A8"><span class="toc-number">5.</span> <span class="toc-text"> DNS应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#dns%E6%A6%82%E8%BF%B0"><span class="toc-number">5.1.</span> <span class="toc-text"> DNS概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#dns%E8%AE%B0%E5%BD%95%E5%92%8C%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F"><span class="toc-number">5.2.</span> <span class="toc-text"> DNS记录和消息格式</span></a></li></ol></li></ol>
      </div>
    </article>
  
  
  <article class="card card-content categories-widget">
    <div class="categories-card">
  <div class="categories-header">
    <i 
      class="iconfont icon-fenlei" 
      style="padding-right: 2px;">
    </i>分类
  </div>
  <div class="categories-list">
    
      <a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/">
        <div class="categories-list-item">
          计算机网络
          <span class="categories-list-item-badge">5</span>
        </div>
      </a>
    
      <a href="/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/">
        <div class="categories-list-item">
          数据库
          <span class="categories-list-item-badge">3</span>
        </div>
      </a>
    
      <a href="/categories/PHP/">
        <div class="categories-list-item">
          PHP
          <span class="categories-list-item-badge">14</span>
        </div>
      </a>
    
      <a href="/categories/Windows%E7%B3%BB%E7%BB%9F/">
        <div class="categories-list-item">
          Windows系统
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
      <a href="/categories/Python/">
        <div class="categories-list-item">
          Python
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
      <a href="/categories/Linux/">
        <div class="categories-list-item">
          Linux
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
      <a href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/">
        <div class="categories-list-item">
          数据结构与算法
          <span class="categories-list-item-badge">2</span>
        </div>
      </a>
    
      <a href="/categories/%E7%BD%91%E7%BB%9C/">
        <div class="categories-list-item">
          网络
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
      <a href="/categories/%E8%B7%AF%E7%94%B1%E4%BA%A4%E6%8D%A2/">
        <div class="categories-list-item">
          路由交换
          <span class="categories-list-item-badge">3</span>
        </div>
      </a>
    
      <a href="/categories/%E8%BD%AC%E8%BD%BD/">
        <div class="categories-list-item">
          转载
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
      <a href="/categories/python/">
        <div class="categories-list-item">
          python
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
  </div>
</div>
  </article>
  
  <article class="card card-content tags-widget">
    <div class="tags-card">
  <div class="tags-header">
    <i 
      class="iconfont icon-biaoqian" 
      style="padding-right: 2px;">
    </i>热门标签
  </div>
  <div class="tags-list">
    
      <a 
        href="/tags/%E7%99%BD%E5%BC%80%E7%94%BB/" 
        title="白开画">
        <div class="tags-list-item">白开画</div>
      </a>
    
      <a 
        href="/tags/%E5%BE%90%E5%A8%81/" 
        title="徐威">
        <div class="tags-list-item">徐威</div>
      </a>
    
      <a 
        href="/tags/PHP/" 
        title="PHP">
        <div class="tags-list-item">PHP</div>
      </a>
    
      <a 
        href="/tags/web%E8%84%9A%E6%9C%AC/" 
        title="web脚本">
        <div class="tags-list-item">web脚本</div>
      </a>
    
      <a 
        href="/tags/%E7%BD%91%E7%BB%9C/" 
        title="网络">
        <div class="tags-list-item">网络</div>
      </a>
    
      <a 
        href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" 
        title="计算机网络">
        <div class="tags-list-item">计算机网络</div>
      </a>
    
      <a 
        href="/tags/%E5%8D%8E%E4%B8%BA/" 
        title="华为">
        <div class="tags-list-item">华为</div>
      </a>
    
      <a 
        href="/tags/%E5%8D%8E%E4%B8%BA%E8%AE%A4%E8%AF%81/" 
        title="华为认证">
        <div class="tags-list-item">华为认证</div>
      </a>
    
      <a 
        href="/tags/%E8%B7%AF%E7%94%B1%E4%BA%A4%E6%8D%A2/" 
        title="路由交换">
        <div class="tags-list-item">路由交换</div>
      </a>
    
      <a 
        href="/tags/GVRP/" 
        title="GVRP">
        <div class="tags-list-item">GVRP</div>
      </a>
    
      <a 
        href="/tags/VLAN/" 
        title="VLAN">
        <div class="tags-list-item">VLAN</div>
      </a>
    
      <a 
        href="/tags/%E5%9F%BA%E7%A1%80/" 
        title="基础">
        <div class="tags-list-item">基础</div>
      </a>
    
      <a 
        href="/tags/ip/" 
        title="ip">
        <div class="tags-list-item">ip</div>
      </a>
    
      <a 
        href="/tags/%E5%A4%A7%E6%95%B0/" 
        title="大数">
        <div class="tags-list-item">大数</div>
      </a>
    
      <a 
        href="/tags/python/" 
        title="python">
        <div class="tags-list-item">python</div>
      </a>
    
      <a 
        href="/tags/%E5%91%BD%E4%BB%A4%E6%8F%90%E7%A4%BA%E7%AC%A6/" 
        title="命令提示符">
        <div class="tags-list-item">命令提示符</div>
      </a>
    
  </div>
</div>
  </article>
  
  
</div>
            </aside>
            <aside class="right-column">
              <div class="sticky-widescreen">
  
  
    <article class="card card-content toc-card">
      <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E5%B1%82%E5%86%85%E5%AE%B9%E6%A6%82%E6%8B%AC"><span class="toc-number">1.</span> <span class="toc-text"> 网络应用层内容概括</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86"><span class="toc-number">2.</span> <span class="toc-text"> 网络应用的基本原理</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E7%9A%84%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84"><span class="toc-number">2.1.</span> <span class="toc-text"> 网络应用的体系结构</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E8%BF%9B%E7%A8%8B%E9%80%9A%E4%BF%A1"><span class="toc-number">2.2.</span> <span class="toc-text"> 网络应用进程通信</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8%E9%9C%80%E6%B1%82%E4%B8%8E%E4%BC%A0%E8%BE%93%E5%B1%82%E6%9C%8D%E5%8A%A1"><span class="toc-number">2.3.</span> <span class="toc-text"> 网络应用需求与传输层服务</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#web%E5%BA%94%E7%94%A8"><span class="toc-number">3.</span> <span class="toc-text"> Web应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#web%E6%A6%82%E8%BF%B0"><span class="toc-number">3.1.</span> <span class="toc-text"> Web概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E5%8D%8F%E8%AE%AE%E6%A6%82%E8%BF%B0"><span class="toc-number">3.2.</span> <span class="toc-text"> HTTP协议概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E8%BF%9E%E6%8E%A5%E7%B1%BB%E5%9E%8B"><span class="toc-number">3.3.</span> <span class="toc-text"> HTTP连接类型</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#http%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F"><span class="toc-number">3.4.</span> <span class="toc-text"> HTTP消息格式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#cookie%E6%8A%80%E6%9C%AF"><span class="toc-number">3.5.</span> <span class="toc-text"> Cookie技术</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#web%E7%BC%93%E5%AD%98%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8A%80%E6%9C%AF"><span class="toc-number">3.6.</span> <span class="toc-text"> Web缓存&#x2F;代理服务器技术</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#email%E5%BA%94%E7%94%A8"><span class="toc-number">4.</span> <span class="toc-text"> Email应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#email%E5%BA%94%E7%94%A8%E6%A6%82%E8%BF%B0"><span class="toc-number">4.1.</span> <span class="toc-text"> Email应用概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#email%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F%E4%B8%8Epop3%E5%8D%8F%E8%AE%AE"><span class="toc-number">4.2.</span> <span class="toc-text"> Email消息格式与POP3协议</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#dns%E5%BA%94%E7%94%A8"><span class="toc-number">5.</span> <span class="toc-text"> DNS应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#dns%E6%A6%82%E8%BF%B0"><span class="toc-number">5.1.</span> <span class="toc-text"> DNS概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#dns%E8%AE%B0%E5%BD%95%E5%92%8C%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F"><span class="toc-number">5.2.</span> <span class="toc-text"> DNS记录和消息格式</span></a></li></ol></li></ol>
    </article>
  
  
  <article class="card card-content">
    <div class="recent-posts-card">
  <div class="recent-posts-header">
    <i 
      class="iconfont icon-wenzhang_huaban" 
      style="padding-right: 2px;">
    </i>最近文章
  </div>
  <div class="recent-posts-list">
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2021-12-13</div>
        <a href="/2021/12/13/python%E7%88%AC%E5%8F%96%E6%B7%98%E5%AE%9D%E5%95%86%E5%93%81/index.html"><div class="recent-posts-item-content">python爬取淘宝商品</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2021-12-13</div>
        <a href="/2021/12/13/PHP%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%B8%B8%E7%94%A8%E6%93%8D%E4%BD%9C/index.html"><div class="recent-posts-item-content">PHP字符串常用操作</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2021-11-29</div>
        <a href="/2021/11/29/PHP%E8%AE%A4%E8%AF%86%E5%AD%97%E7%AC%A6%E4%B8%B2/index.html"><div class="recent-posts-item-content">PHP认识字符串</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2021-11-21</div>
        <a href="/2021/11/21/PHP%E5%87%BD%E6%95%B0%E7%9A%84%E5%BA%94%E7%94%A8/index.html"><div class="recent-posts-item-content">PHP函数的应用</div></a>
      </div>
    
  </div>
</div>
  </article>
  
  
</div>
            </aside>
          </div>
        </div>
      </div>
    </div>
     
    <footer class="footer">
  <div class="footer-container">
    <div>
      <div class="footer-dsc">
        <span>
          Copyright ©
          
            2021 -
          
          2021
        </span>
        &nbsp;
        <a 
          href="/" 
          class="footer-link">
          程序小站
        </a>
      </div>
    </div>

    
      <div class="footer-dsc">
        
          Powered by
          <a 
            href="https://hexo.io/" 
            class="footer-link" 
            target="_blank" 
            rel="nofollow noopener noreferrer">
            &nbsp;Hexo
          </a>
        
        
          <span>&nbsp;|&nbsp;</span>
        
        
          Theme -
          <a 
            href="https://github.com/theme-kaze" 
            class="footer-link" 
            target="_blank"
            rel="nofollow noopener noreferrer">
            &nbsp;Kaze
          </a>
        
      </div>
    
    
    
    
      <div class="footer-dsc">
        
          本站总访问量<span id="busuanzi_value_site_pv"></span>次
        
        
          <span>&nbsp;|&nbsp;</span>
        
        
          本站总访客数<span id="busuanzi_value_site_uv"></span>次
        
      </div>
      
    
</footer> 
    
  <a 
    role="button" 
    id="scrollbutton" 
    class="basebutton" 
    aria-label="回到顶部">
    <i class="iconfont icon-arrowleft button-icon"></i>
  </a>

<a 
  role="button" 
  id="menubutton" 
  class="basebutton">
  <i class="iconfont icon-menu button-icon"></i>
</a>
<a 
  role="button" 
  id="popbutton" 
  class="basebutton" 
  aria-label="控制中心">
  <i class="iconfont icon-expand button-icon"></i>
</a>
<a 
  role="button" 
  id="darkbutton" 
  class="basebutton darkwidget" 
  aria-label="夜色模式">
  <i class="iconfont icon-weather button-icon"></i>
</a>
<a 
  role="button" 
  id="searchbutton" 
  class="basebutton searchwidget" 
  aria-label="搜索">
  <i class="iconfont icon-search button-icon"></i>
</a> 
     
     
      

  
  
    
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css">

  
 
     
     
      <script>
  var addImgLayout = function () {
    var img = document.querySelectorAll('.post-content img')
    var i
    for (i = 0; i < img.length; i++) {
      var wrapper = document.createElement('a')
      wrapper.setAttribute('href', img[i].getAttribute('data-src'))
      wrapper.setAttribute('aria-label', 'illustration')
      wrapper.style.cssText =
        'width: 100%; display: flex; justify-content: center;'
      if (img[i].alt) wrapper.dataset.caption = img[i].alt
      wrapper.dataset.nolink = true
      img[i].before(wrapper)
      wrapper.append(img[i])
      var divWrap = document.createElement('div')
      divWrap.classList.add('gallery')
      wrapper.before(divWrap)
      divWrap.append(wrapper)
    }
    baguetteBox.run('.gallery')
  }
</script>
<script>
  loadScript(
    "/js/lib/lightbox/baguetteBox.min.js",
    addImgLayout
  )
</script>
 
     
     
    <script src="/js/main.js"></script> 
    
      <script> 
        loadScript('/js/lib/busuanzi.min.js') 
      </script>
     
    
      <script>
        var addLazyload = function () {
          var observer = lozad('.lozad', {
            load: function (el) {
              el.srcset = el.getAttribute('data-src')
            },
            loaded: function (el) {
              el.classList.add('loaded')
            },
          })
          observer.observe()
        }
      </script>
      <script>
        loadScript('/js/lib/lozad.min.js', addLazyload)
      </script>
     
    
    
      <script>
        setTimeout(() => {localSearch("search.json")}, 0)
      </script>
    
  </body>
</html>
